import torch.nn as nn
from model.resnet_attn import *

class UltraNetwork(nn.Module):
    def __init__(self, classNum, firstChannel=1):
        super(UltraNetwork, self).__init__()
        self.resnet = multi_resnet18_kd(first_channel=firstChannel, num_classes=classNum)

    def forward(self, x):
        x, middle_output1, middle_output2, middle_output3, final_fea, middle1_fea, middle2_fea, middle3_fea, attn1, attn2, attn3, attn4 = self.resnet(x)
        return [x, middle_output1, middle_output2, middle_output3, final_fea, middle1_fea, middle2_fea, middle3_fea, attn1, attn2, attn3, attn4]